/*
 * @Description:
 * @Version: 1.0
 * @Author: Will
 * @Date: 2022-04-12 10:18:12
 * @LastEditors: MarsLay 331412466@qq.com
 * @LastEditTime: 2024-01-15 09:26:41
 * @FilePath: \wit-tourism\src\store\index.js
 * Copyright (C) 2022 Will. All rights reserved.
 */
import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);
const api = ["http://192.168.0.10:4910", "http://qa.api.nanhu.hola-ev.cn"];
const dev = 0;
export default new Vuex.Store({
  state: {
    api: api[dev],
    direct: [],
    userinfo: JSON.parse(localStorage.getItem("userinfo")),
    timeOut: 60 * 60 * 1000, // 用户超时 时间
    domTimeVal: 30000, // 全局定时器 （每多少秒 执行一次 用户超时方法）
    loading: false, // 全局loading 状态
  },
  mutations: {
    changeDirect(state, payload) {
      state.direct = payload;
    },
  },
  actions: {},
  modules: {},
});
